// import request from '../config'
import request from '../config/indexNew'

// 设置
export const settingsUnlimitedSend = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/Settings',
    method: 'POST',
    data
  })
}
// 查看设置
export const showSettingsUnlimitedSend = (data?: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/settings/show',
    method: 'POST',
    data
  })
}
// 列表
export const getUnlimitedSendList = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/List',
    method: 'POST',
    data
  })
}
// 新增&编辑
export const putUnlimitedSend = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/Put',
    method: 'POST',
    data
  })
}
// 客户群列表
export const getCustGroupchatList = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/GroupchatList',
    method: 'POST',
    data
  })
}
// 暂停
export const pauseUnlimitedSend = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/Pause',
    method: 'POST',
    data
  })
}
// 开始
export const startUnlimitedSend = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/Start',
    method: 'POST',
    data
  })
}
// 删除
export const delUnlimitedSend = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/Del',
    method: 'POST',
    data
  })
}
// 详情
export const getUnlimitedSendDetail = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/Detail',
    method: 'POST',
    data
  })
}
// 详情-子列表
export const getUnlimitedSendDetailList = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/DetailList',
    method: 'POST',
    data
  })
}
// 详情-子列表-导出
export const exportUnlimitedSendDetailExport = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/DetailListExport',
    method: 'POST',
    data,
    responseType: 'arraybuffer'
  })
}
// 标签筛选客户总数
export const tagFiltrateCust = (data: any) => {
  return request({
    url: '/api/win-tool/AutoMakeFriend/TagFiltrate',
    method: 'POST',
    data
  })
}
// 标签筛选客户总数
export const getForecastNum = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/TagFiltrateAdvanced',
    method: 'POST',
    data
  })
}

// 重发失败任务
export const restartTask = (data: any) => {
  return request({
    url: '/api/win-tool/UnlimitedSend/restart-task',
    method: 'POST',
    data
  })
}

/**
 * 获取无限群发预计群发客户数
 * @param data 
 * @returns 
 */
export const getInfiniteSendEstimatedNumber = (data: any) => {
    return request({
      url: '/api/win-tool/UnlimitedSend/expect',
      method: 'POST',
      data
    })
  }